home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 2003 September / PC Answers September 2003.iso / Software / trial / MonitorIT 5.2.06 / monitorit_fullsetup.exe / data1.cab / Rpm / ViewEventlogDisplay.asp < prev    next >
Encoding:
Text File  |  2003-06-24  |  62.1 KB  |  1,634 lines

  1. <html>
  2. <head>
  3. <title>EventLogWatch Display</title>
  4.  
  5. <link rel="stylesheet" type="text/css" href="css/rpmstyle.css">
  6. <style>
  7.  
  8. .EventFilter { border-style : solid; border-width : thin; overflow : clip; background-color:white }
  9. .EventFilter { border-top-color : graytext; border-left-color : graytext; border-bottom-color : white; border-right-color : white}
  10.  
  11. .EventLog { border-style : solid; border-width : thin; overflow : scroll;  background-color:white }
  12. .EventLog { border-top-color : graytext; border-left-color : graytext; border-bottom-color : white; border-right-color : white}
  13.  
  14. .EventConfig {  overflow : none; background-color:activeborder }
  15. .EventConfig { border-top-color : graytext; border-left-color : graytext; border-bottom-color : white; border-right-color : white}
  16.  
  17. .VASelectBox { height : 270px; width : 375px; background-color: white; color: infotext; }
  18. .VASelectBox { border-style : solid; border-width : 2px; }
  19. .VASelectBox { border-top-color : #555555; border-left-color : #555555; border-bottom-color : #E0E0E0; border-right-color : #E0E0E0}
  20.  
  21. .VAMainBox { border: none; background-color : activeborder; }
  22.  
  23. .PopUpBox { background-color:activeborder; position:absolute; margin:0; padding:0; border : solid thin; }
  24. .PopUpBox { border-top-color : #E0E0E0; border-left-color : #E0E0E0; border-bottom-color : #555555; border-right-color : #555555 }
  25.  
  26. </style>
  27. </head>
  28.  
  29. <body class="bodyc" style="margin:2px;" language="JavaScript" RPMHostIP="!BreakoutBot:MonitorIP!" RPMHostPort="!BreakoutBot:MonitorPort!" RPMUserName="!BreakoutBot:UserName!" BOBDone="!BreakoutBot:Done!" onload="top.banner.savePageCoord(event,document.body,'ViewEventlogDisplay'); InitRpmCC_VA();" onbeforeunload="DiscoRpmCC_VA()" onresize="processSizeChange()" onclick="checkClick()" onkeydown="processBSP()">
  30.  
  31. <script LANGUAGE="JavaScript">
  32. <!--
  33. //border-style : solid; border-width : thin;
  34. var    VAMode = ""; // Mode of Operation, New, Edit, Delete, Lookup, ObjectLookup
  35. var    ALupMode = ""; // Lookup Mode of Operation, Computer, Counter
  36. var   AlertLupRecCount = 0; // Count of records returned from Alert Lookup operation
  37. var   AlertSelectIdx = 0; // Index of currently selected Alert 
  38. var    VA_CommBusy = 0; // Comm busy flag
  39. var    CurAlertID = ""; // Current Alert Name selected in Configure
  40. var    CurAlertName = ""; // Current Alert Group Name selected in Configure
  41. var    CurAlertDesc = ""; // Current Alert Group Description
  42. var   FilterRecCnt = 0; // Count of records in the filter
  43. var    FilterSelectIdx = 0; // Filter Select Index 
  44. var    AudioOutBusy = false; // Flag for AudioOut
  45. var   VA_Tid = null; // AudioOut free timeout
  46. var   Tid = null, CTid= null, ATid= null;
  47. var   ELogWinInit = ""; // save for ElogWin init HTML
  48. var   ELBgFlg = 0; // Alert Event Log Background color toggle
  49. var     bdH = 0;
  50. var     byM = null;
  51. var     borderSz = 2; // Thin Bord is 2pixels
  52. var     ValidateFilter = true; // Validate Alert Filter on entry
  53. var     Hp = null; // Host port
  54. var    ReconnectEvent = false;
  55.  
  56. var AC_CompStoreArr = new Array();
  57. var MostRecentHours = 3;
  58. var IsDBChange = false;
  59.  
  60. var   AlertSelectIdx = 0; // Index of currently selected Alert 
  61. var     AlertStoreArr = new Array();
  62. var   AlertLupRecCount = 0; // Count of records returned from Alert Lookup operation
  63.  
  64. // Capture and ignore script errors
  65.     window.onerror = wwScrErr;
  66. function wwScrErr() {
  67.     return true;
  68. }
  69.  
  70. /* On Load tell the Comm control to Connect to the Server */
  71. function InitRpmCC_VA() {
  72.     top.MainLoaded = true; // Flag that Main is now loaded
  73.     top.banner.savePageCoord(event,document.body,"ViewEventlogDisplay");
  74.  
  75.     byM = 2*parseFloat(document.body.style.margin);
  76.     processSizeChange();
  77.  
  78.     /* get Audio Alert checkbox state */
  79.     cc = top.banner.RpmCC_Ban.RegGetKey(top.banner.ServerID+"EventlogDisplayAudioAlertState"); // get state
  80.     if ( cc == "unchecked" ) { // If not checked 
  81.         AlertAudioEnabled.checked = "";
  82.     }
  83.     else { 
  84.         AlertAudioEnabled.checked == "CHECKED";
  85.     }
  86.     cc = top.banner.RpmCC_Ban.RegGetKey(top.banner.ServerID+"EventlogDisplayMostRecentHours"); // get hours
  87.     if ( cc != "" ) {
  88.        MostRecentHours = parseInt(cc,10);
  89.     }
  90.         
  91.       /* Connect to Server and initiate Alert Group Lookup */
  92.     Hp = parseInt(document.body.RPMHostPort,10);
  93.     RpmCC_VA.Connect(document.body.RPMHostIP,Hp, "");
  94. }
  95. function processReconnect() {
  96.     Tid = null;
  97.     if ( RpmCC_VA.IsConnected() ) {
  98.         Tid = setTimeout("processConnectionCheck()",30000); // Delay 30 secs then check connection
  99.         return;
  100.     }
  101.     RpmCC_VA.Connect(document.body.RPMHostIP,Hp, "");
  102. }
  103. function processConnectConfirmed() {
  104.     if ( ReconnectEvent == false ) {
  105.         top.banner.processStartComm(); 
  106.         processVALookupReset(); // go do Alert Lookup
  107.         processLogAndFilterWindows(); // initialize Log and Filter Windows
  108.         ReconnectEvent = true;
  109.     }
  110.     top.Rstatus.Pstat("Connected");
  111.     if ( Tid != null ) {
  112.         clearTimeout(Tid); // stop timeout routine
  113.     }
  114.     Tid = setTimeout("processConnectionCheck()",30000); // Delay 30 secs then check connection
  115. }
  116. function processConnectionCheck() {
  117.     Tid = null;
  118.     RpmCC_VA.SendKeepAlive("Check");
  119.     Tid = setTimeout("processConnectionCheck()",30000); // Delay 30 secs then check connection
  120. }
  121.  
  122. function processMostRecentHours() {
  123.     MostRecentHours = lasthours.selectedIndex;
  124.     top.banner.RpmCC_Ban.RegSetKey(top.banner.ServerID+"EventlogDisplayMostRecentHours",""+MostRecentHours); // set hours
  125.     processClearButton();
  126.     processMostRecentHoursLookup();
  127. }
  128. function processMostRecentHoursLookup() {
  129.     WarningBox.style.display = "";
  130.    if ( MostRecentHours > 0 ) {
  131.        // Get Last 'N' Records
  132.         if ( RpmCC_VA.GetEventLogDataRecord("GetLast"+MostRecentHours) ) {
  133.             top.Rstatus.Pstat("Unable to start the EventLog Data Record LOOKUP request",true);
  134.         }
  135.         else {
  136.             VA_CommBusy = 1; // set Comm busy flag
  137.         }
  138.     }
  139.     else {
  140.         WarningBox.style.display = "none";
  141.         WarningBox1.style.display = "";
  142.     }
  143. }
  144.  
  145. // Process Database Change event
  146. function processDBChanged() {
  147.     CTid = null;
  148.     top.banner.processStartComm(); 
  149.     IsDBChange = true;
  150.     
  151.     // Insure Configure pop-up is hidden and disabled
  152.    //ConfigButton.className = "BoxButtonD"; // disable button
  153.    ConfigButton.disabled = "disabled"; // disable button
  154.     PopUpDiv.style.display="none";
  155.     goSaveLogEntries();
  156.     
  157.     // Clear Stores
  158.     AlertStoreArr.length = 0;
  159.     AC_CompStoreArr.length = 0;
  160.     ValidateFilter = true;
  161.     AlertSelectIdx = 0; // Reset Index of currently selected Alert 
  162.     processVALookupReset(); // go do Alert Lookup
  163.     top.Rstatus.StatDB.style.display = "none";
  164.     AL_AlertSel.style.display = "none";
  165. }
  166.  
  167. /* On Unload tell the Comm control to Disconnect from the Server */
  168. function DiscoRpmCC_VA() {
  169.     top.BannerMenuShow();
  170.     RpmCC_VA.Disconnect();
  171.     if (VA_CommBusy == 1) { // stop logo animation if Comm busy flag set
  172.         top.banner.processStopComm();
  173.     }
  174.     
  175.     // Save Audio Alert checkbox state
  176.     cc = ( AlertAudioEnabled.checked == false ) ? "unchecked" : "checked";
  177.     top.banner.RpmCC_Ban.RegSetKey(top.banner.ServerID+"EventlogDisplayAudioAlertState",cc); // set state
  178.     processClearButton();
  179.     WarningBox.style.display = "";
  180.     goSaveLogEntries();
  181.         
  182.     /* Clear AudioOut Timer if set */
  183.     if ( VA_Tid != null ) {
  184.         clearTimeout(VA_Tid);
  185.     }
  186.     if ( Tid != null ) {
  187.         clearTimeout(Tid);
  188.     }
  189.     if ( CTid != null ) {
  190.         clearTimeout(CTid);
  191.     }
  192.     if ( ATid != null ) {
  193.         clearTimeout(ATid);
  194.     }
  195. }
  196. function goSaveLogEntries() {
  197.     /* Redefine Log Time based on Current Time */
  198.     var dob = new Date(); // get current d/t
  199.     var lt = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear();
  200.     lt += " " + dob.getHours() + ":" + dob.getMinutes() + ":" + dob.getSeconds();
  201.     ELogParams.logtime = lt; // update the D/T stamp    
  202.     ELogParams.ELBgFlg = ELBgFlg; // save background flag
  203.     
  204.     /* Save the Log Display, and Filter Display & Store on the Banner Page before exiting */
  205.     top.banner.saveLogDisplay(ELogWin.innerHTML);
  206.     top.banner.saveLogFilter(ELogViewCur.innerHTML);
  207.     AL_AlertSel.innerText = ""; // clear
  208. }
  209.  
  210. // Process Display View Size Change
  211. var SCbsy = false;
  212. var PuPW = "500px", PuPWu=500, PuPH = "280px", PuPHu=280, PuPCH = "235px";
  213. var VFilW = "630px"
  214. function processSizeChange() {
  215.     if ( SCbsy ) 
  216.         return;
  217.     SCbsy = true;
  218.     // Display Height and Width
  219.     bCh = document.body.clientHeight;
  220.     bCw = document.body.clientWidth;
  221.  
  222.     // Determine minimums
  223.     bCh = (bCh < bdH+byM+270) ? bdH+byM+270 : bCh;
  224.     bCw = (bCw < PuPWu) ? PuPWu : bCw;
  225.    document.body.scroll = (bCw <= PuPWu || bCh <= bdH+byM+270) ? "yes" : "no";
  226.    
  227.    // Set Height/Widths for Chart and Button areas
  228.     VA_MainBox.style.height = bCh-(bdH+byM-borderSz)-10;
  229.     VA_MainBox.style.width = bCw-byM-4;
  230.     VA_MainBox.style.display = "";
  231.  
  232.     ELogWinFullH = "" + (bCh-TitleDivSize);    
  233.     var ELWinc = (bCh-TitleDivSize-175);
  234.     ELWinc = (ELWinc < 0) ? 0 : ELWinc;
  235.     ELogWinSplitH = "" + ELWinc;    
  236.     ELogWin.style.height = ( ELogViewCurLine.style.display == "none" ) ? ELogWinFullH : ELogWinSplitH;
  237.     
  238.     ELogViewCur.style.width = (bCw-byM-34 > 530) ? "530px" : bCw-byM-34;
  239.  
  240.     //PopUpContext Menu
  241.    PopUpContextSize(bCw);
  242.     
  243.    // PopUp 
  244.    PuPLeft = (bCw-PuPWu)/2;
  245.    PuPTop = (bCh-PuPHu)/2;
  246.    PopUpDiv.style.left = PuPLeft+"px"; 
  247.    PopUpDiv.style.top = "25px";
  248.    PopUpDiv.style.height = (bCh-110);
  249.    PopUpDiv.style.width = PuPW;
  250.    VA_Select.style.height = (bCh-130);
  251.     SCbsy = false;
  252. }
  253.  
  254. /* Initial Alert Lookup Request */
  255. function processVALookupReset() {
  256.     AlertLupRecCount = 0; // clear Lookup record counter
  257.     if ( RpmCC_VA.AlertGroupLookup("*") ) {
  258.         top.Rstatus.Pstat("Unable to start the Alert LOOKUP request",true);
  259.         processResetButton();
  260.     }
  261.     else {
  262.         VA_CommBusy = 1; // set Comm busy flag
  263.         top.Rstatus.Pstat("One moment while Alert LOOKUP request completes");
  264.     }
  265. }
  266.  
  267. /* Alert Lookup Op Complete */
  268. function processAlertOpComplete() {
  269.     AL_AlertSel.style.display = "none"; // insure hidden
  270.     if (AlertLupRecCount == 0) { // check if any records found
  271.          top.Rstatus.Pstat("No record matches found for Alert LOOKUP request",true);    
  272.         WarningBox.style.display = "none";
  273.         WarningBox1.style.display = "";
  274.      }
  275.      else {
  276.         for (var i=0; i < AlertStoreArr.length; i+=AlertRecLength) {
  277.             if ( AlertStoreArr[i+8] == "01/01/1999 11:40:00" 
  278.                    || AlertStoreArr[i+8] == "1/1/1999 11:40:0" ) {
  279.                    // Keep EventLog Alert
  280.             }
  281.             else { // Otherwise delete all other Alert types
  282.                 AL_AlertSel.remove(i/AlertRecLength);
  283.                 var idx = i;
  284.                 for (var j = idx+AlertRecLength; j < AlertStoreArr.length; ++idx, ++j) {
  285.                     AlertStoreArr[idx] = AlertStoreArr[j];
  286.                 }
  287.                 i -= AlertRecLength;
  288.                 AlertStoreArr.length -= AlertRecLength;                
  289.             }
  290.         }
  291.         AL_AlertSel.style.display = ""; // compnesate for IE 5.5 bug; see "hideAlertSel()" below
  292.         ALupMode = "";
  293.           //ConfigButton.className = "BoxButton"; // enable button
  294.           ConfigButton.disabled = ""; // enable button   
  295.           //ViewCurrentButton.className = "BoxButton"; // enable button
  296.           ViewCurrentButton.disabled = ""; // enable button   
  297.         top.Rstatus.Pstat("Request Completed");
  298.         processValidateFilter(); // go validate the Alert Filter
  299.         if ( IsDBChange == false ) {
  300.             processMostRecentHoursLookup();
  301.         }
  302.           IsDBChange = false;
  303.         processAccumulatedAlerts(); // go process the accumulated Alerts
  304.         top.banner.processStopCommX(); 
  305.         Tid = setTimeout("hideAlertSel()",50); // Delay 50 ms. then try to hide AlertSel
  306.      }
  307.     processResetButton();    
  308. }
  309.  
  310. // Print Log
  311. var DiscStatWindow = null;
  312. function processPrintStatus() {
  313.     if ( !top.banner.IE55orBetter ) {
  314.         alert("Print requires IE 5.5/SP1 or greater. Download current, free IE update from Microsoft's web site");
  315.         return;
  316.     }
  317.     FakeBut.click();    // simulate event to call "savePageCoord(...)"
  318.     var wprop = "height="+top.banner.bCh+",width="+top.banner.bCw
  319.     wprop += ",top="+(top.banner.bY-28)+",left="+(top.banner.bX-4)+",scrollbars";
  320.     var rName = ""+Math.random(); // use Random number to get unique Window name
  321.     rName = rName.substring(2,rName.length);
  322.     DiscStatWindow = window.open("",rName,wprop);
  323.     if ( DiscStatWindow == null ) {
  324.         return;   
  325.     }
  326.     var dh = "<html><head><title>MonitorIT - EventLogWatch Display Report</title>";
  327.     dh += "<link rel='stylesheet' type='text/css' href='css/rpmstyle.css'></head><body";
  328.     dh += " title='Exit to Close Window when Printing is complete'>"; 
  329.     dh += ELogWin.innerHTML;
  330.     dh += '<script LANGUAGE="JavaScript">HdrTable.border="1"; ploghdr1.width="20"; ploghdr2.width="30"; ploghdr3.width="150"; ploghdr4.width="94"; ploghdr5.width="102"; ploghdr6.width="48"; ploghdr7.width="48"; window.focus();';
  331.     dh += ' </script></body></html>';
  332.     DiscStatWindow.document.open();
  333.     DiscStatWindow.document.write(dh)
  334.     DiscStatWindow.document.close();
  335.     DiscStatWindow.print();
  336. }
  337.  
  338. /* Initialize the Log and Filter Windows */
  339. function processLogAndFilterWindows() {
  340.     var    hs = "";
  341.     outputLogWindowHeader();
  342.      ELogWinInit = ELogWin.innerHTML; // save for clear log
  343.     outputFilterWindowHeader();
  344.     /* Restore the Log Display if Previously Saved */
  345.     hs = top.banner.restoreLogDisplay();
  346.     if ( hs != "" ) { 
  347.         ELogWin.innerHTML = hs;
  348.         ELBgFlg = ELogParams.ELBgFlg; // restore
  349.     } 
  350.     /* Restore the Filter Display and Storage if Previously Saved */
  351.     hs = RpmCC_VA.RegGetKey(top.banner.ServerID+"EventlogDisplayLogFilterSave");
  352.     if ( hs != "" ) {
  353.         ELogViewCur.innerHTML = hs;
  354.         FilterRecCnt = VA_FilterStore.length / FilterRecSize;
  355.     } 
  356. }
  357. function outputLogWindowHeader() {
  358.     /* Format Output to Log Window */
  359.     FOps = "<table id='HdrTable' border='0' cellpadding='1' cellSpacing='1' width='100%'><tr>";
  360.     FOps += "<td id='ploghdr1' width='20' align='center' style='background-color:activeborder' class='optextb'>";
  361.     FOps += "Log" + "</td>";
  362.     FOps += "<td id='ploghdr2' width='30' align='center' style='background-color:activeborder' class='optextb'>";
  363.     FOps += "Type" + "</td>";
  364.     FOps += "<td id='ploghdr3' width='150' align='center' style='background-color:activeborder' class='optextb'>";
  365.     FOps += "Server/Computer Name" + "</td>";
  366.     FOps += "<td id='ploghdr4' width='94' align='center' style='background-color:activeborder' class='optextb'>";
  367.     FOps += "Source" + "</td>";
  368.     FOps += "<td id='ploghdr5' width='102' align='center' style='background-color:activeborder' class='optextb'>";
  369.     FOps += "Date/Time" + "</td>";
  370.     FOps += "<td id='ploghdr6' width='48' align='center' style='background-color:activeborder' class='optextb'>";
  371.     FOps += "Event ID" + "</td>";
  372.     FOps += "<td id='ploghdr7' width='48' align='center' style='background-color:activeborder' class='optextb'>";
  373.     FOps += "Categ" + "</td>";
  374.     FOps += "<td width='*' align='center' style='background-color:activeborder' class='optextb'>";
  375.     FOps += "Event Description" + "</td>";
  376.     FOps += "</tr></table>";
  377.     ELogWin.insertAdjacentHTML("afterBegin",FOps);
  378.      WarningBox.style.display = "";    
  379. }
  380.  
  381. function outputFilterWindowHeader() {
  382.     /* Format Output to Filter Window */
  383.     FOps = "<table border='0' cellpadding='0' cellSpacing='1' width='500'>";
  384.     FOps += "<tr><td width='50%' colspan='1' align='center' style='background-color:activeborder' class='optextb'>";
  385.     FOps += "Watch/Alert Name" + "</td>";
  386.     FOps += "<td width='50%' colspan='1' align='center' style='background-color:activeborder' class='optextb'>";
  387.     FOps += "Watch/Alert Type" + "</td>";
  388.     FOps += "</tr></table>";
  389.     ELogViewCur.insertAdjacentHTML("beforeEnd",FOps);
  390. }
  391.  
  392. // Process the Unsolicited Alerts that were Accumulated
  393. function processAccumulatedAlerts() {
  394.     var    PrevAgid = "", hs = null;
  395.     /* Get and process the Unsolicited Alerts accumulated */
  396.       var Tflg = ELogParams.logtime; // Time stamp of last Log entry
  397.       if ( Tflg == "0" ) { // get Start Time for Client
  398.        Tflg = top.banner.getLogStartTime();
  399.        ELogParams.logtime = Tflg;
  400.    }
  401.  
  402.    // Get Event Log Alerts
  403.     PrevAgid = ""; // reinitialize
  404.     Uaa = top.banner.getUnsolicitedEventLogAlertArray(); 
  405.     top.banner.enableUnsolicitedEventLogAlerts();
  406.     UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs~LogFileDataID
  407.     for ( var i=0; i<UaaArray.length; i++ ) {
  408.        hs = UaaArray[i]; // get an AlertGrp ID~LogFileDataID
  409.        if ( hs != PrevAgid ) { // if same as previous, skip it
  410.            processUnsolicitedEventLogAlertEvent(hs,Tflg);
  411.            PrevAgid = hs; // set as Previous   
  412.         }
  413.     }
  414.     if ( ELogParams.logeventid != "" ) {
  415.        //ClearButton.className = "BoxButton"; // enable button
  416.        ClearButton.disabled = ""; // enable button   
  417.     }
  418. }
  419.  
  420. /* Play specified WAV file as an AudioAlert */
  421. function processAlertAudioOut(ETs, ECn, EOn, ECmn, ACs, ACd) {
  422.     if ( AlertAudioEnabled.checked == false || AudioOutBusy == true )
  423.         return; // exit if not enabled or Busy
  424.     RpmCC_VA.DoMessageBeep(0x40); // System Asterisk
  425. }
  426. function freeAudioOut() {
  427.     AudioOutBusy = false;
  428. }
  429.  
  430. /* Process the Unsolicited Event Log Alert Event */
  431. function processUnsolicitedEventLogAlertEvent(AGID_ELDID,Tflg) {
  432.     var warr = new Array();
  433.     warr = AGID_ELDID.split("~"); // split out Alert Grp ID and LogData Record ID
  434.     if ( CheckAlertFilter(warr[0],Tflg) == false ) 
  435.         return; // if not in filter
  436.     /* Initiate Read of EventLog Data */
  437.     if ( RpmCC_VA.GetEventLogDataRecord(warr[1]) ) {
  438.         top.Rstatus.Pstat("Unable to start the EventLog Data Record LOOKUP request",true);
  439.     }
  440.     else {
  441.         VA_CommBusy = 1; // set Comm busy flag
  442.     }
  443. }
  444. // Event Log Alert Log Record
  445. var ServEventRecLth = 2;
  446. function processAlertEventLogRecord(LogRecStrg) {
  447.       var SLRec = new Array();
  448.       SLRec = LogRecStrg.split("~"); // parse the Log Record
  449.       // Alert Group ID, Computer ID, Time Stamp
  450.     if ( IsDisplayInLog(SLRec[3],SLRec[2],SLRec[5]) == false )
  451.         return; // Didn't pass filter test
  452.  
  453.     /* Check for duplicate by comparing versus Event ID array */
  454.     var EidArr = new Array();     
  455.     EidArr = ELogParams.logeventid.split(",");
  456.     Eid = SLRec[0]+"~"+SLRec[3]; // Event ID = EventLog MonitorID~AlertGroupID
  457.     for ( var i=0; i<EidArr.length; i++ ) {
  458.         if ( Eid == EidArr[i] ) // if match then duplicate
  459.               return;
  460.     }
  461.     var CompID = SLRec[2]; // Computer ID
  462.     // Save Event Log Record string in temporary store
  463.     addElementToSelect(VA_ServEventStore,CompID); //+0
  464.     addElementToSelect(VA_ServEventStore,"EventLog~"+LogRecStrg);
  465.     /* Lookup Computer Name and Description */
  466.     if ( ALupMode != "AlertEvent" ) { 
  467.     // if read not already in progress, 
  468.         goCheckServEventStore();
  469.     }
  470. }
  471.  
  472.  
  473. var curServAlertCompNme = null;
  474. var curServAlertCompDesc = null;
  475. function processAlertServicesComputerLookup(CID,CNME,CDESC) {
  476.     curServAlertCompNme = CNME; // save Computer Name and Description
  477.     curServAlertCompDesc = CDESC;
  478.     goProcessLogRec(CID); // go process log record
  479.     goCheckServEventStore();
  480. }
  481. function goCheckServEventStore() {
  482.     var CompID = null; 
  483.     while ( VA_ServEventStore.length > 0 ) {
  484.         CompID = VA_ServEventStore.options[0].text; // get next entry
  485.         if ( getCompNameDesc(CompID) ) { // see if Computer already in local store
  486.             if ( !goProcessLogRec(CompID) ) // yes-go process immediately
  487.                 break;
  488.         }
  489.         else if ( !RpmCC_VA.ComputerLookupByIDArray(CompID) ) {
  490.             ALupMode = "AlertEvent"; 
  491.             VA_CommBusy = 1; // set Comm busy flag
  492.             return true; // exit now
  493.         }
  494.     }
  495.     ALupMode = ""; // reset
  496.     return false;
  497. }
  498. function    goProcessLogRec(CmpID) { //  process log record
  499.     /* Get Log Record from Store based on Computer ID */
  500.     for (var i=0; i < VA_ServEventStore.length; i+=ServEventRecLth) {
  501.         if ( VA_ServEventStore.options[i].text == CmpID ) {
  502.             outputLogEvent(null,VA_ServEventStore.options[i+1].text); // go process
  503.             for ( var j=0; j<ServEventRecLth; j++ ) { // remove from temporary store
  504.                 VA_ServEventStore.remove(i);   
  505.             }
  506.             return true;
  507.           }
  508.     }
  509.     return false;
  510. }
  511.  
  512. /* Check Filter for Eligible Alert */
  513. function CheckAlertFilter(Agid,Tflg) {
  514.     if ( Tflg == null ) { // set serach time for Event if not specified
  515.        Tflg = ELogParams.logtime;
  516.           if ( Tflg == "0" ) { // get Start Time for Client
  517.            Tflg = top.banner.getLogStartTime();
  518.            ELogParams.logtime = Tflg;
  519.        }
  520.     }
  521.     return IsDisplayInLog(Agid,null,Tflg);// check if in Filter
  522. }        
  523.  
  524. /* Process Clear Log button click */
  525. function processClearButton() {
  526.     ELogWin.innerHTML = ELogWinInit; // clear log
  527.      WarningBox.style.display = "none";    
  528.     /* Redefine Log Time based on Current Time */
  529.     var dob = new Date(); // get current d/t
  530.     var lt = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear();
  531.     lt += " " + dob.getHours() + ":" + dob.getMinutes() + ":" + dob.getSeconds();
  532.     ELogParams.logtime = lt; // update the D/T stamp    
  533.     ELBgFlg = 0;
  534.    //ClearButton.className = "BoxButtonD"; // disable button
  535.    ClearButton.disabled = "disabled"; // disable button   
  536.    //StatusPrintButton.className = "BoxButtonD"; // disable button
  537.    StatusPrintButton.disabled = "disabled"; // disable button   
  538. }
  539.  
  540. /* Process Configure Button Click */
  541. function processConfigureButton() {
  542.     if ( ALupMode == "AlertEvent" )
  543.         return; // ignore, currently doing Computer Lookup
  544.    //ConfigButton.className = "BoxButtonD"; // disable button
  545.    ConfigButton.disabled = "disabled"; // disable button
  546.     PopUpDiv.style.display="";
  547.     AL_AlertSel.style.display = "";
  548.     if ( AL_AlertSel.length > 0 ) {
  549.         AL_AlertSel.options[0].selected = "selected";
  550.         populateInput(0);
  551.     }
  552.  
  553.     if ( lasthours.length == 0 ) {
  554.         for ( var i=0; i<25; i++ ) {
  555.             stxt = ""+i;
  556.             el = addElementToSelect(lasthours,stxt);
  557.             if ( i == MostRecentHours ) {
  558.                el.selected = "selected";
  559.             }
  560.         }
  561.     }
  562. }
  563.  
  564. function processDoneButton() {
  565.     ALupMode = ""; // reset
  566.     RpmCC_VA.RegSetKey(top.banner.ServerID+"EventlogDisplayLogFilterSave",ELogViewCur.innerHTML)
  567.     AL_AlertSel.style.display = "none";
  568.     PopUpDiv.style.display = "none";
  569.    //ConfigButton.className = "BoxButton"; // enable button
  570.    ConfigButton.disabled = ""; // enable button   
  571.     top.Rstatus.Pstat("");
  572. }
  573.  
  574. /* Process ViewCurrent and Hide Current Log Filter Button Clicks */
  575. function processViewCurrentButton() {
  576.       ELogWin.style.height=ELogWinSplitH;
  577.    vct = ELogViewCurLine.innerHTML;
  578.     ELogViewCurLine.style.display="";
  579.     ELogViewCurLine.innerHTML = vct;
  580.    //ViewCurrentButton.className = "BoxButtonD"; // disable button
  581.    ViewCurrentButton.disabled = "disabled"; // disable button
  582.     ELogViewCurLine.scrollIntoView(false);
  583. }
  584.  
  585. function processHideCurrentButton() {
  586.       ELogWin.style.height=ELogWinFullH;
  587.     ELogViewCurLine.style.display="none";
  588.    //ViewCurrentButton.className = "BoxButton"; // enable button
  589.    ViewCurrentButton.disabled = ""; // disable button
  590. }
  591.  
  592. /* Process Update Log Filter and Window */
  593. function processUpdateLogFilter(FilOp) {
  594.     if ( FilOp == "add" ) { // Add an entry to the Current View
  595.          FOps = "<div agrpid='" + CurAlertID + "' onclick='processLogFilterClick(this)' id='lf";
  596.          FOps += CurAlertID + "' style='background-color:white; cursor:hand'>"
  597.     }
  598.     else { // otherwise, Update an entry in the Current View
  599.           Fo = document.all["lf"+CurAlertID];
  600.         Fo.innerHTML = ""; // clear entry 
  601.         FOps = "";
  602.     }
  603.  
  604.     /* Accomodate Names Larger than Field Size */    
  605.     Fcon = "EventLog: " + CurELName; 
  606.     if ( Fcon.length > 47 ) { // Object : Name
  607.         FconT = Fcon; // set for display in the title
  608.         Fcon = Fcon.substring(0,46) + "...";   
  609.     }
  610.     else {
  611.        FconT = ""; 
  612.     }
  613.     FconDesc = "";
  614.  
  615.     /* Output Parameters */
  616.     FOps += "<table border='0' cellpadding='0' cellSpacing='1' width='500'>";
  617.     FOps += "<tr><td width='50%' align='left' class='optext' style='cursor:hand' title='" + CurAlertDesc + "'>";
  618.     FOps += CurAlertName + "</td>";
  619.     FOps += "<td width='50%' align='left' class='optext' style='cursor:hand' title='" + FconT + FconDesc + "'>";
  620.     FOps += Fcon + "</td>";
  621.     FOps += "</tr></table>";
  622.  
  623.     if ( FilOp == "add" ) {
  624.         FOps += "</div>";
  625.         ELogViewCur.style.overflow = ( FilterRecCnt > 5 ) ? "scroll" : "";
  626.         ELogViewCur.insertAdjacentHTML("beforeEnd",FOps);
  627.     }
  628.     else {
  629.         Fo.insertAdjacentHTML("beforeEnd",FOps);
  630.     }
  631. }
  632.  
  633. /* Process Click on an Entry in the Log Filter Current View */
  634. var CurLflSelected = null;
  635. function processLogFilterClick(LFobj) {
  636.     if ( CurLflSelected != null ) {
  637.        document.all[CurLflSelected].style.backgroundColor = "white";
  638.     }
  639.     if ( CurLflSelected == LFobj.id ) { // if same line
  640.         //VC_DeleteButton.className = "BoxButtonD";
  641.         VC_DeleteButton.disabled = "disabled";
  642.         CurLflSelected = null;
  643.     }
  644.     else {
  645.         CurLflSelected = LFobj.id;
  646.         LFobj.style.backgroundColor = "scrollbar";
  647.         //VC_DeleteButton.className = "BoxButton";
  648.         VC_DeleteButton.disabled = "";
  649.     }
  650. }
  651.  
  652. /* Process Delete Button Click */
  653. function processDeleteEntryButton() {
  654.     if ( CurLflSelected != null ) { // if an entry is highlited
  655.         // delete highlited entry
  656.         CAid = document.all[CurLflSelected].agrpid; // get AlertGrp ID
  657.        document.all[CurLflSelected].outerText = ""; // clear entry
  658.         CurLflSelected = null; // reset to no selected entry
  659.           //VC_DeleteButton.className = "BoxButtonD"; // disable Delete button
  660.           VC_DeleteButton.disabled = "disabled"; // disable Delete button
  661.       
  662.        // clear entry from the Filter Store
  663.         FilObj = VA_FilterStore; // Filter Store
  664.         if ( getFilterEntry(CAid) == null ) // Find index to the entry in the Store
  665.             return; // if entry not found
  666.         for ( var i=0; i<FilterRecSize; i++ ) { // remove entry from the Store
  667.             FilObj.remove(FilterSelectIdx);
  668.         }
  669.        --FilterRecCnt; // adjust count
  670.         ELogViewCur.style.overflow = ( FilterRecCnt > 5 ) ? "scroll" : "";
  671.        // update save in Registry
  672.         RpmCC_VA.RegSetKey(top.banner.ServerID+"EventlogDisplayLogFilterSave",ELogViewCur.innerHTML)
  673.    }
  674. }
  675.  
  676. /* Process Show Event Button Click */
  677. var   FilterRecSize = 7; // Filter Record size
  678. function processApplyButton() {
  679.     var Scid = ""; // Computer ID Array
  680.     /* Create an array of selected computers */
  681.     for ( var i=0, j=0; i<CountOfComps; i++ ) { // Test each computer for Checked
  682.         if ( document.all["cmpa_"+i].checked == "1" ) {
  683.             if ( j > 0) {
  684.                Scid += ","; // array id separator
  685.             }
  686.             Scid += document.all["cmpa_"+i].cmpid; // save Computer ID
  687.             ++j;
  688.         }
  689.     }
  690.     if ( j == 0 ) {
  691.         CurLflSelected = "lf"+CurAlertID;
  692.         processDeleteEntryButton();
  693.         return;
  694.     }
  695.  
  696.     var nd = new Array();
  697.     ASdt = VA_StartDate.value; // Get Start Date
  698.     AEdt = VA_StopDate.value; // Get End Date
  699.     nd = ASdt.split(" ");
  700.     ASdt = nd[3] + " " + "0:0:0";
  701.     var Dob = new Date(ASdt); // Date object
  702.     Sms = Dob.getTime(); // Milliseconds since 1/1/70 0:0:0
  703.  
  704.     nd = AEdt.split(" ");
  705.     AEdt = nd[3] + " " + "23:59:59";
  706.     Dob = new Date(AEdt);
  707.     Ems = Dob.getTime(); // Milliseconds since 1/1/70 0:0:0
  708.  
  709.     /* See if entry already exists in the filter */
  710.     FilObj = VA_FilterStore; // Filter Store
  711.     if ( getFilterEntry(CurAlertID) != null ) { // if entry already in the filter
  712.         FilOp = "repl"; // Filter Update Op is Replace
  713.         i = FilterSelectIdx; // index to found entry
  714.         FilObj.options[i+1].text = Scid;    
  715.         FilObj.options[i+2].text = ASdt;
  716.         FilObj.options[i+3].text = Sms;    
  717.         FilObj.options[i+4].text = AEdt;    
  718.         FilObj.options[i+5].text = Ems;    
  719.         FilObj.options[i+6].text = curServName; // current Service Name if Service    
  720.     }
  721.     else { // otherwise, not yet in the Filter Store
  722.         FilOp = "add"; // Filter Update Op is Add
  723.         addElementToSelect(FilObj,CurAlertID); 
  724.         addElementToSelect(FilObj,Scid); 
  725.         addElementToSelect(FilObj,ASdt);
  726.         addElementToSelect(FilObj,Sms);
  727.         addElementToSelect(FilObj,AEdt);
  728.         addElementToSelect(FilObj,Ems);
  729.         addElementToSelect(FilObj,curServName); // current Service Name if Service
  730.         ++FilterRecCnt; // bump record count
  731.     }
  732.     /* Update Log Filter Window */
  733.     processUpdateLogFilter(FilOp);
  734.     
  735.     /* Initiate Read of Event Table for Events Matching Criteria if Counter */
  736.     if ( AL_AlertSel.style.display == "" && AL_AlertSel.style.visibility != "hidden") {
  737.         AL_AlertSel.focus(); // restore focus
  738.     }
  739. }
  740.  
  741. /* Search Filter Store for Given Alert Group ID */
  742. function getFilterEntry(AGID) {
  743.     FilObj = VA_FilterStore; // Filter Store
  744.     FilMax = FilterRecCnt * FilterRecSize;
  745.     for ( i=0; i<FilMax; i+=FilterRecSize ) {
  746.         if ( AGID == FilObj.options[i].text ) {
  747.             FilterSelectIdx = i; // save index
  748.             return i;
  749.         }
  750.     }
  751.     return null;
  752. }
  753.  
  754. // Validate Alert Filter
  755. function processValidateFilter() {
  756.     if ( ValidateFilter == false ) 
  757.         return; // exit if not needed
  758.     ValidateFilter = false; // reset
  759.     for ( var i=0; i<VA_FilterStore.length; i+=FilterRecSize ) {
  760.         // Check for valid Alert Group ID and that End D/T is greater than current D/T
  761.         if ( !IsValidAlertGroup(VA_FilterStore.options[i].text) ) {
  762.             // remove entry from Filter display
  763.            document.all["lf"+VA_FilterStore.options[i].text].outerText = ""; 
  764.              // remove entry from the Store
  765.             for ( var j=0; j<FilterRecSize; j++ ) {
  766.                 VA_FilterStore.remove(i);
  767.             }
  768.               --FilterRecCnt; // adjust count
  769.               i -= FilterRecSize; // adjust index for just deleted entry
  770.        }
  771.    }
  772.     ELogViewCur.style.overflow = ( FilterRecCnt > 5 ) ? "scroll" : "";
  773.       // update save in Registry
  774.     RpmCC_VA.RegSetKey(top.banner.ServerID+"EventlogDisplayLogFilterSave",ELogViewCur.innerHTML)
  775. }
  776. /* Check if Valid Alert Group ID */
  777. function IsValidAlertGroup(UID) {
  778.     for (var i=0; i < AlertStoreArr.length; i+=AlertRecLength) {
  779.         if ( AlertStoreArr[i+1] == UID ) {
  780.             return true;
  781.         }
  782.     }
  783.     return false;
  784. }
  785.  
  786.  
  787. /* Search Filter and Determine If Event Should Be Displayed */
  788. function IsDisplayInLog(AGID,CID,TS) {
  789.     // check if entry in Filter for Alert Group ID
  790.     if ( VA_FilterStore.length == 0 ) {
  791.         return true; // defaultto show everthing if no filter
  792.     }
  793.     if ( getFilterEntry(AGID) == null ) 
  794.          return false; // not in Filter
  795.  
  796.     // check if Computer ID in Array of Found Filter entry
  797.     if ( CID != null ) {
  798.         var CaR = new Array();
  799.         FilObj = VA_FilterStore; // Filter Store
  800.         CaR = FilObj.options[FilterSelectIdx+1].text.split(","); // Comp ID array
  801.         for ( var i=0; i<CaR.length; ++i ) {
  802.             if ( CID == CaR[i] ) // if match on Comp ID
  803.                 break;
  804.         }
  805.         if ( i>=CaR.length )
  806.              return false; // not in Filter
  807.      }
  808.     // Specified parameters match a Filter entry
  809.     return true;
  810. }
  811.  
  812. var   EventRecCount = 0; // Count of temporary Event records 
  813. var    EventRecLength = 18; // Event record length
  814. var     EventSelectIdx = 0;
  815. function AlertEventLupRec1(EvID, EvTimStmp, EvValue, EvThresh, EvOver, EvDur, EvEmNotify, EvPhNotify, EvProNotify, EvPgNotify, EvObjNme, EvCntNme, EvCmpNme) {
  816.     StoreObj = VA_EventStore; // Storage
  817.     if ( IsEventExist(EvID) == false ) { // if not received yet
  818.         addElementToSelect(StoreObj,EvID); //+0
  819.         addElementToSelect(StoreObj,EvTimStmp);
  820.         addElementToSelect(StoreObj,EvCntNme);
  821.         addElementToSelect(StoreObj,EvObjNme);
  822.         addElementToSelect(StoreObj,EvCmpNme); 
  823.         addElementToSelect(StoreObj,EvValue); //+5
  824.         addElementToSelect(StoreObj,EvEmNotify); 
  825.         addElementToSelect(StoreObj,EvPhNotify); 
  826.         addElementToSelect(StoreObj,EvProNotify); 
  827.         addElementToSelect(StoreObj,EvPgNotify); //+9
  828.         addElementToSelect(StoreObj,EvThresh); 
  829.         addElementToSelect(StoreObj,EvOver); 
  830.         addElementToSelect(StoreObj,EvDur); //+12
  831.         /* allocate space for Part 2 */
  832.         addElementToSelect(StoreObj,""); //+13
  833.         addElementToSelect(StoreObj,"");
  834.         addElementToSelect(StoreObj,"");
  835.         addElementToSelect(StoreObj,"");
  836.         addElementToSelect(StoreObj,""); //+17
  837.     }
  838.     else { // already received Part 2, update Part 1
  839.         ESix = EventSelectIdx * EventRecLength;
  840.         StoreObj.options[ESix+0].text = EvID;
  841.         StoreObj.options[ESix+1].text = EvTimStmp;
  842.         StoreObj.options[ESix+2].text = EvCntNme;
  843.         StoreObj.options[ESix+3].text = EvObjNme;
  844.         StoreObj.options[ESix+4].text = EvCmpNme;
  845.         StoreObj.options[ESix+5].text = EvValue;
  846.         StoreObj.options[ESix+6].text = EvEmNotify; 
  847.         StoreObj.options[ESix+7].text = EvPhNotify; 
  848.         StoreObj.options[ESix+8].text = EvProNotify; 
  849.         StoreObj.options[ESix+9].text = EvPgNotify; //+9
  850.         StoreObj.options[ESix+10].text = EvThresh; 
  851.         StoreObj.options[ESix+11].text = EvOver; 
  852.         StoreObj.options[ESix+12].text = EvDur; //+12
  853.         outputLogEvent(StoreObj,ESix); // go output to Log Window if eligible
  854.         for ( var i=0; i<EventRecLength; i++ ) { // remove from temporary store
  855.             StoreObj.remove(ESix);   
  856.         }
  857.     }
  858. }
  859.  
  860. function AlertEventLupRec2(EvID, EvAlertID, EvValueID, EvAlGrpID, EvObjID, EvCntrID, EvCmpID, EvGrpID, EvServerID, EvObjDesc, EvCntrDesc, EvCmpDesc, EvOSver) {
  861.     StoreObj = VA_EventStore; // Storage
  862.     if ( IsEventExist(EvID) == false ) { // if not received yet
  863.         // allocate space for Part 1
  864.         addElementToSelect(StoreObj,EvID); //+0
  865.         addElementToSelect(StoreObj,"");
  866.         addElementToSelect(StoreObj,"");
  867.         addElementToSelect(StoreObj,"");
  868.         addElementToSelect(StoreObj,""); 
  869.         addElementToSelect(StoreObj,""); //+5
  870.         addElementToSelect(StoreObj,""); 
  871.         addElementToSelect(StoreObj,""); 
  872.         addElementToSelect(StoreObj,""); 
  873.         addElementToSelect(StoreObj,""); //+9
  874.         addElementToSelect(StoreObj,""); 
  875.         addElementToSelect(StoreObj,""); 
  876.         addElementToSelect(StoreObj,""); //+12 
  877.         /* save Part 2 */
  878.         addElementToSelect(StoreObj,EvCmpID); //+13
  879.         addElementToSelect(StoreObj,EvAlGrpID); 
  880.         addElementToSelect(StoreObj,EvObjDesc);
  881.         addElementToSelect(StoreObj,EvCntrDesc);
  882.         addElementToSelect(StoreObj,EvCmpDesc); //+17
  883.     }
  884.     else { // already received Part 1, update Part 2
  885.         ESix = EventSelectIdx * EventRecLength;
  886.         StoreObj.options[ESix+13].text = EvCmpID;
  887.         StoreObj.options[ESix+14].text = EvAlGrpID;
  888.         StoreObj.options[ESix+15].text = EvObjDesc;
  889.         StoreObj.options[ESix+16].text = EvCntrDesc;
  890.         StoreObj.options[ESix+17].text = EvCmpDesc;
  891.         outputLogEvent(StoreObj,ESix); // go output to Log Window if eligible
  892.         for ( var i=0; i<EventRecLength; i++ ) { // remove from temporary store
  893.             StoreObj.remove(ESix);   
  894.         }
  895.     }
  896. }
  897.  
  898. var LogEventBsy = false;
  899. /* Check if Event Passes Filter Test and if so, Output to Log Window */
  900. function outputLogEvent(ESObj,ESx) {
  901.     if ( ESObj != null ) 
  902.         return;
  903.     var warr = new Array();
  904.       var SLRec = new Array();
  905.     SLRec = ESx.split("~"); // parse the Log Record
  906.     if ( SLRec[0] == "EventLog" ) { // process EventLog Alert
  907.         EGid = SLRec[4]; // Alert Group ID
  908.         ECmn = curServAlertCompNme; // Computer Name
  909.         ECmd = curServAlertCompDesc; // Cmp Desc
  910.         EOn = EOvr = ""; // Obj Name, Over 
  911.         warr = SLRec[6].split("/"); // Time Stamp
  912.         warr[0] = ""+parseInt(warr[0],10);
  913.         warr[1] = ""+parseInt(warr[1],10);
  914.         ETs = warr.join("/");
  915.         Eid = SLRec[1]+"~"+SLRec[4]; // Event ID 
  916.         Ev = SLRec[11]; // Status Code = Event ID
  917.         // make sure complete message has no single quote characters
  918.         warr.length =0;
  919.         warr = SLRec[12].split("'"); 
  920.         SLRec[12] = warr.join("`");
  921.         var EvLTyp = "";
  922.         if ( SLRec[8] == "1" ) { EvLTyp = "Error"; }
  923.         else if ( SLRec[8] == "2" ) { EvLTyp = "Warning"; }
  924.         else if ( SLRec[8] == "4" ) { EvLTyp = "Information"; }
  925.         else if ( SLRec[8] == "8" ) { EvLTyp = "Security"; }
  926.         ECON = ECn = "EvLog "+SLRec[7]+" / "+EvLTyp; // Event Log Name & Type
  927.         ECONT = "";
  928.     }
  929.     // Determine Event Type; Check if not filtered
  930.     Etyp = "Info"; //preset
  931.     EImg ="EInfo";
  932.     if ( SLRec[8] == "1" ) { // Error Type
  933.         Etyp = "Error"; EImg = "EErr";
  934.     }
  935.     else if ( SLRec[8] == "2" ) { 
  936.         Etyp = "Warn"; EImg = "EWarn"; 
  937.     }
  938.     else if ( SLRec[8] == "4" ) {
  939.         Etyp = "Info"; EImg ="EInfo";
  940.     }
  941.     else if ( SLRec[8] == "8" ) {
  942.         Etyp = "Sec"; EImg ="ESecurity";
  943.     }
  944.     else if ( SLRec[8] == "16" ) {
  945.         Etyp = "Sec"; EImg ="ESecurityFailure";
  946.     }
  947.     
  948.     // Determine Log type
  949.     var LogType = new Array("Application","Security","System","Directory Service","DNS Server","File Replication Service");
  950.     mtype = "Apl"; 
  951.     if ( SLRec[7] == LogType[1] ) { mtype = "Sec";  }
  952.     else if ( SLRec[7] == LogType[2] ) { mtype = "Sys"; }
  953.     else if ( SLRec[7] == LogType[3] ) { mtype = "Dir";  }
  954.     else if ( SLRec[7] == LogType[4] ) { mtype = "Dns";  }
  955.     else if ( SLRec[7] == LogType[5] ) { mtype = "Rep";  }
  956.  
  957.     // Go speak audio alert if enabled
  958.     processAlertAudioOut(); // process AudioAlert
  959.  
  960.     /* Accomodate Names Larger than Field Size */    
  961.     if ( ECmn.length > 30 ) { // Computer Name
  962.         ECmnT = ECmn; // set for display in the title
  963.         ECmn = ECmn.substring(0,30) + "...";   
  964.     }
  965.     else {
  966.        ECmnT = "";
  967.     }
  968.     if ( ECmd.charAt(ECmd.length-1) == "." ) {
  969.         ECmd = ECmd.substring(0,ECmd.length-1);
  970.     }
  971.     ECmnT +=  ECmd;
  972.     
  973.     if ((ELBgFlg ^= 1) == 0) {
  974.         FOps = "<div style='background-color:white'>";
  975.     }
  976.     else {
  977.         FOps = "<div style='background-color:e8e8e8'>";
  978.     }
  979.     FOps += "<table border='0' cellpadding='1' cellSpacing='1' width='100%'";
  980.     FOps += "><tr>";    
  981.     FOps += '<td width="20" class="optext">';
  982.     FOps += mtype + '</td>';
  983.     FOps += '<td width="30" align="center" class="optext"><img src="images/';
  984.     FOps += EImg + '.gif" align="absmiddle" width="17" height="18"></td>';
  985.     FOps += '<td width="150" class="optext">';
  986.     FOps += ECmn + '</td>';
  987.     FOps += '<td width="94" class="optext">';
  988.     FOps += SLRec[9] + '</td>';
  989.     FOps += '<td width="102" class="optext">';
  990.     FOps += ETs + '</td>';
  991.     FOps += '<td width="48" class="optext">';
  992.     FOps += SLRec[11] + '</td>';
  993.     FOps += '<td width="48" colspan="1" class="optext">';
  994.     FOps += ((SLRec[10] == "0")?"NONE":SLRec[10]);
  995.     FOps += '</td>';
  996.     FOps += '<td width="*" colspan="1" style="cursor:default" class="optext">';
  997.     
  998.     var darr = new Array();
  999.     darr = SLRec[12].split("\x0d\x0a\x0a\x0d\x0a\x0a");
  1000.     SLRec[12] = darr.join("<br>");
  1001.     darr = SLRec[12].split("\x0d\x0a\x0a");
  1002.     SLRec[12] = darr.join("<br>");
  1003.     
  1004.     FOps += SLRec[12] + '</td>';
  1005.     FOps += "</tr></table></div>";
  1006.     
  1007.     ELogText.insertAdjacentHTML("afterBegin",FOps);
  1008.     //ELogWin.scrollIntoView();
  1009.     ELogParams.logeventid += Eid + ","; // update the Event ID Array
  1010.    //ClearButton.className = "BoxButton"; // enable button
  1011.    ClearButton.disabled = ""; // enable button   
  1012.    //StatusPrintButton.className = "BoxButton"; // enable button
  1013.    StatusPrintButton.disabled = ""; // enable button   
  1014.    LogEventBsy = false; // set free
  1015. }
  1016.  
  1017. /* Get Alert Name from Store based on Alert ID */
  1018. function getAlertNameSpecial(UID) {
  1019.     AlertName = "";
  1020.     for (i=0, j=0; i < AlertStoreArr.length; ++j, i+=AlertRecLength) {
  1021.         if ( AlertStoreArr[i+1] == UID ) {
  1022.             AlertName = AlertStoreArr[i];
  1023.             AlertSelectIdx = j;
  1024.             break;
  1025.         }
  1026.     }
  1027.     return AlertName;
  1028. }
  1029.  
  1030. /* Get Event Name from Store based on Event ID */
  1031. function IsEventExist(EID) {
  1032.     ENobj = VA_EventStore; // get object
  1033.     for (var i=0, j=0; i < ENobj.length; ++j, i+=EventRecLength) {
  1034.         if ( ENobj.options[i].text == EID ) {
  1035.             EventSelectIdx = i;
  1036.             return true;
  1037.           }
  1038.     }
  1039.     return false;
  1040. }
  1041.  
  1042. /* Process Populate Configure Edit Fields */
  1043. var Tops = ""; // output string
  1044. var SBObj = null; // SelectBox Object for output
  1045. var CkCArr = new Array(); // "Checked" Computers array
  1046. var curServName = null; // Current Service Name
  1047. var CTparm = "optext"; // Computer Text Color
  1048. var CurrentAlertType = null;
  1049. function populateInput(idx) {
  1050.     SetCursor("wait");
  1051.     setSelectAll(false); // disable Select/UnselectAll buttons
  1052.     CurAlertName = AlertStoreArr[idx];
  1053.     CurAlertID = AlertStoreArr[idx+1];
  1054.     CurAlertDesc = AlertStoreArr[idx+2];
  1055.     CkCArr.length = 0; // init checked computer array
  1056.     curServName = ""; // initialize
  1057.     CountOfComps = 0; // clear
  1058.     // If Service, preset Start and End D to today
  1059.     var dob = new Date(); // get current d/t
  1060.     var calt = AlertStoreArr[idx+10];
  1061.     AlertStoreArr[idx+10] = "EventLog";
  1062.     CurrentAlertType = "E"; // "Event Log" type
  1063.             
  1064.     /* Check if Entry exists in the Filter */
  1065.     FilObj = VA_FilterStore; // Filter Store
  1066.     if ( getFilterEntry(CurAlertID) != null ) { // if entry in the filter
  1067.         i = FilterSelectIdx; // index to found entry
  1068.         CkCArr = FilObj.options[i+1].text.split(","); // get checked CIDs
  1069.     }
  1070.     
  1071.    /* setup Object:Counter info for display */
  1072.    SBObj = VA_Select;
  1073.     SBObj.innerHTML = ""; // clear current display
  1074.  
  1075.     if ( CurrentAlertType == "E" ) { // if Event Log
  1076.         if ( RpmCC_VA.ELMonitorLookupByAlertGroup(CurAlertID) ) {
  1077.             ALupMode = "";
  1078.             top.Rstatus.Pstat("Unable to start the Event Log Computer LOOKUP request",true);
  1079.             return;
  1080.         }
  1081.         else {
  1082.             VA_CommBusy = 1; // set Comm busy flag
  1083.             CountOfCompsRcvd = 0; 
  1084.             CompIdLupArr = ""; // Computer Id Array
  1085.             ALupMode = "ELComputerLookupPopIn"; // Mode
  1086.             top.Rstatus.Pstat("One moment while Computer LOOKUP request completes");
  1087.         }
  1088.     }
  1089. }
  1090. function setSelectAll(sFlag) {
  1091.     if ( sFlag ) { 
  1092.        SButtonState(bSelC,"0");
  1093.        SButtonState(bUselC,"0");
  1094.    }
  1095.    else { // otherwise disable the buttons
  1096.        SButtonState(bSelC,"1");
  1097.        SButtonState(bUselC,"1");
  1098.    }
  1099. }
  1100. function SButtonState(BtObj,BState) {
  1101.     //BtObj.className = (BState == "0") ? "BoxButton" : "BoxButtonD";
  1102.     BtObj.disabled = (BState == "0") ? "" : "disabled";
  1103. }
  1104.  
  1105. var CountOfCompsRcvd = 0;
  1106. var LogTable = new Array("Application","Security","System","Directory Service","DNS Server","File Replication Service");
  1107. var CurELName = "";
  1108. function processELMonitorLookupRecord(ELCrec) {
  1109.     var wrkarr = new Array();
  1110.     ++CountOfCompsRcvd;
  1111.     wrkarr = ELCrec.split("~"); // parse the computer record
  1112.     if ( CountOfCompsRcvd > 1 ) { // if not first
  1113.          CompIdLupArr += ","; // Computer Id Array
  1114.     }
  1115.     else {
  1116.         for ( var i=0; i<LogTable.length; i++ ) {
  1117.            if ( LogTable[i] == wrkarr[4] ) {
  1118.                CurELName = wrkarr[4];
  1119.                break;
  1120.            }
  1121.        }
  1122.     }
  1123.     CompIdLupArr += wrkarr[2]; // Computer Id Array
  1124. }
  1125. function processELMonitorOpComplete() {
  1126.     if ( ALupMode == "ELComputerLookupPopIn" ) {
  1127.         if ( CountOfCompsRcvd > 0 ) {
  1128.             MaxCmpCount = CountOfCompsRcvd;
  1129.             SBObj.style.overflow = ( CountOfCompsRcvd > 4 ) ? "scroll" : "";
  1130.             Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>";
  1131.             Tops += "<tr><td width='5'> </td>";
  1132.             Tops += "<td width='19' align='center'><img src='images/EventlogDisplaySm.gif' width='16' height='16'></td>";
  1133.             Tops += "<td width='*' class='optext'>" + CurELName + " Log</td>";
  1134.             Tops += "</tr></table>";
  1135.             CountOfComps = 0; // initialize
  1136.             ALupMode = "EventPopIn";
  1137.             processPopulateInputCounterOpComplete(); // Start lookup for Computer Names/Descriptions
  1138.         }
  1139.         else {
  1140.             ALMode = ""; // reset mode
  1141.              top.Rstatus.Pstat("No associated computers found for this Event Log alert",true);
  1142.          }
  1143.     }
  1144. }
  1145. function processELMonitorOpError() {
  1146.     top.Rstatus.Pstat("Error reading Event Log Monitor alert parameters",true);
  1147. }
  1148.  
  1149.  
  1150. var CountOfComps = 0;
  1151. var MaxCmpCount = 0;
  1152. var CompIdLupArr = "";
  1153. /* OpComplete for the CounterLookupForObjCounterArray */
  1154. function processPopulateInputCounterOpComplete() {
  1155.     if ( PopUpDiv.style.display == "none" )
  1156.         return; // exit if Configure Window no longer present
  1157.     /* Lookup Computer Names and Descriptions */
  1158.     if ( RpmCC_VA.ComputerLookupByIDArray(CompIdLupArr) ) {
  1159.         top.Rstatus.Pstat("Unable to start the Computer LOOKUP request",true);
  1160.         ALupMode = ""; // reset
  1161.     }
  1162.     else {
  1163.         VA_CommBusy = 1; // set Comm busy flag
  1164.         CountOfComps = 0; 
  1165.         top.Rstatus.Pstat("One moment while lookup request completes");
  1166.     }
  1167. }
  1168.  
  1169. function processPopulateInputComputer(Cid,CmpNme,CmpDesc) {
  1170.     if ( PopUpDiv.style.display == "none" )
  1171.         return; // exit if Configure Window no longer present
  1172.     /* Format Computer Name and Description */
  1173.         if ( CountOfComps+1 == MaxCmpCount ) { // if Last Computer for Display
  1174.            lineGIF = "L";
  1175.         }
  1176.         else {
  1177.              lineGIF = "T";
  1178.         } 
  1179.         /* if using from Filter Entry, determine if Checked */
  1180.         CkdS = "' checked='0' src='images/Unchecked.gif'"; // default
  1181.         var CImg = "Computer";
  1182.         if ( CkCArr.length > 0 ) { // if from Filter
  1183.             for ( var i=0; i<CkCArr.length; i++ ) {
  1184.                 if ( Cid == CkCArr[i] ) { // if this matches a Checked one
  1185.                      break;
  1186.                 }
  1187.             }
  1188.             if ( i < CkCArr.length ) { // if match versus Checked Array of IDs
  1189.                 CkdS = "' checked='1' src='images/Checked.gif'";
  1190.                 CImg = "EventlogDisplaySm";
  1191.             }
  1192.         }
  1193.         Tops += "<table border='0' cellpadding='0' cellSpacing='0' width='350'>";
  1194.         Tops += "<tr><td width='39' height='20' align='right'><img src='images/" + lineGIF +".gif' width='19' height='20'></td>";
  1195.           Tops += "<td width='11' align='center'><img id='cmpa_" + CountOfComps;
  1196.           Tops += "' cmpid='" + Cid + CkdS;
  1197.           Tops += " style='cursor:hand' onclick='procCompImgClick(this)' width='9' height='9'></td>";
  1198.         Tops += "<td width='19' align='center'><img id='cmpb_" + CountOfComps;
  1199.         Tops += "' src='images/"+CImg+".gif' style='cursor:hand' onclick='procCompImgClick(this)' width='14' height='16' title='";
  1200.         Tops += CmpDesc + "'></td>";
  1201.         Tops += "<td width='*' class='"+CTparm+"'>" + CmpNme + "</td>";
  1202.         Tops += "</tr></table>";
  1203.         ++CountOfComps; // bump index
  1204. }
  1205.  
  1206. function processPopulateInputOpComplete() {
  1207.     /* Final Format and Output */
  1208.     if ( PopUpDiv.style.display == "none" )
  1209.         return; // exit if Configure Window no longer present
  1210.     ALupMode = ""; // reset
  1211.     SBObj.insertAdjacentHTML("beforeEnd",Tops);
  1212.  
  1213.     //DoneButton.className = "BoxButton"; // enable button
  1214.     DoneButton.disabled = ""; // enable button
  1215.     setSelectAll(true); // enable Select/UnselectAll buttons
  1216.     SetCursor("auto");    
  1217.     if ( AL_AlertSel.style.display == "" && AL_AlertSel.style.visibility != "hidden") {
  1218.         top.Rstatus.Pstat("Request Completed");
  1219.         AL_AlertSel.focus(); // restore focus
  1220.     }
  1221. }
  1222.  
  1223. function procUsrAltClick(CObj) {
  1224.     if ( CObj.id != "usralt0" ) 
  1225.                 return;
  1226.     if ( CObj.checked == "1" ) { // if currently Checked, Uncheck
  1227.         usralt1.src = "images/Unchecked.gif";
  1228.        CObj.checked = "0"; // Set Unchecked
  1229.    }
  1230.     else { // otherwise Check
  1231.         usralt1.src = "images/Checked.gif";
  1232.        CObj.checked = "1"; // Set Checked
  1233.     }
  1234.     processApplyButton();
  1235. }
  1236.  
  1237. /* Process Click on Computer Image */
  1238. function procCompImgClick(COb) {
  1239.     isx = COb.id;  
  1240.     if ( isx.charAt(0) != "c" ) // if not a "cmpa_xx"
  1241.                 return;
  1242.     var cx = isx.substring(5,isx.length); // Strip off index
  1243.     CObj = document.all["cmpa_"+cx]; // Clicked Computer Entry
  1244.     var CIObj = document.all["cmpb_"+cx]; // Clicked Computer Entry Image
  1245.     
  1246.     if ( CObj.checked == "1" ) { // if currently Checked, Uncheck
  1247.         CObj.src = "images/Unchecked.gif";
  1248.        CObj.checked = "0"; // Set Unchecked
  1249.        CIObj.src = "images/Computer.gif";
  1250.    }
  1251.     else { // otherwise Check
  1252.         if ( CTparm == "optextr" ) { // if Suspended, don't add to filter
  1253.             top.Rstatus.Pstat("Alert is currently Suspended",true);    
  1254.             if ( AL_AlertSel.style.display == "" && AL_AlertSel.style.visibility != "hidden") {
  1255.                 AL_AlertSel.focus(); // restore focus
  1256.             }
  1257.             return;
  1258.         }
  1259.         CObj.src = "images/Checked.gif";
  1260.        CObj.checked = "1"; // Set Checked
  1261.        CIObj.src = "images/EventlogDisplaySm.gif";
  1262.     }
  1263.     if ( arguments.length == 1 ) {
  1264.         processApplyButton();
  1265.     }
  1266. }
  1267.  
  1268. // compensate for IE 5.x bug
  1269. function hideAlertSel() {
  1270.     Tid = null;
  1271.     AL_AlertSel.style.display = "none";
  1272. }
  1273.  
  1274.  
  1275. // Add Computer to Store if Not Already
  1276. var CompRecLength = 3;
  1277. function processCompAddToStore(CNme,CDesc,Cid) {
  1278.     for ( var i=0; i<AC_CompStoreArr.length; i+=CompRecLength ) {
  1279.         if ( Cid == AC_CompStoreArr[i] ) { // if in Store, skip it
  1280.             return;
  1281.         }
  1282.     }
  1283.     // Not in Store, Add now
  1284.     AC_CompStoreArr[i++] = Cid; 
  1285.     AC_CompStoreArr[i++] = CNme; 
  1286.     AC_CompStoreArr[i] = CDesc; 
  1287. }
  1288. var curCompDesc = "";
  1289. function getCompNameDesc(CompID) {
  1290.     for ( var i=0; i<AC_CompStoreArr.length; i+=CompRecLength ) {
  1291.         if ( CompID == AC_CompStoreArr[i] ) { // if in Store
  1292.             // save Computer Name and Description
  1293.             curServAlertCompDesc = AC_CompStoreArr[i+2];
  1294.             curServAlertCompNme = AC_CompStoreArr[i+1]; 
  1295.             return true;
  1296.         }
  1297.     }
  1298.     return false;
  1299. }
  1300.  
  1301. // Process to Toggle the Hide and Show of the Banner & Menu Frames
  1302. var hideToggle = 0;
  1303. var TitleDivSize = 100;
  1304. function processBannerMenu() {
  1305.     if ( hideToggle == 0 ) {
  1306.         top.BannerMenuHide(); hideToggle = 1;   
  1307.         ViewAlertsTitleDiv.style.display = "none"; 
  1308.         TitleDivSize = 56; 
  1309.     }
  1310.     else {
  1311.         top.BannerMenuShow(); hideToggle = 0;   
  1312.         ViewAlertsTitleDiv.style.display = "";  
  1313.         TitleDivSize = 100;
  1314.     }   
  1315. }
  1316.  
  1317. // Process SelectALL or UnselectALL
  1318. function processSelect(Pflg) {
  1319.     var CObj = null;
  1320.     for ( var j=0, i=0; j<CountOfComps; j++ ) {
  1321.         CObj = document.all["cmpa_"+j]; // computer entry in tree
  1322.         if (CObj.checked == Pflg) {
  1323.             procCompImgClick(CObj,true); // go process
  1324.             ++i; // bump number changed
  1325.         }
  1326.     }
  1327.     if ( i > 0 ) {
  1328.         processApplyButton();
  1329.     }
  1330.     if ( AL_AlertSel.style.display == "" && AL_AlertSel.style.visibility != "hidden") {
  1331.         AL_AlertSel.focus(); // restore focus
  1332.     }
  1333. }
  1334.     
  1335. // Null funcs
  1336. function    processResetButton() { 
  1337.     top.banner.processStopCommX(); 
  1338. }
  1339. function    checkEnableSchedButton() { 
  1340. }
  1341.  
  1342. function PopUpContextOpen() {
  1343.     AL_AlertSel.style.visibility = "hidden";
  1344. }
  1345. function PopUpContextClose() {
  1346.     AL_AlertSel.style.visibility = "visible";
  1347. }
  1348.  
  1349. //-->
  1350. </script>
  1351.  
  1352. <script LANGUAGE="JAVASCRIPT" SRC="js/Calendar.js" PURPOSE="COMPONENT" CLASSNAME="com.netobjects.Calendar"></script>
  1353. <script LANGUAGE="JavaScript" src="js/MiscFunc.js"></script>
  1354. <script LANGUAGE="JavaScript" src="js/ButtonFunc.js"></script>
  1355. <script LANGUAGE="JavaScript" src="js/CalendarTimeFunc.js"></script>
  1356. <script LANGUAGE="JavaScript" src="js/AlertFunc.js"></script>
  1357. <script LANGUAGE="JavaScript" src="js/WinServicesFunc.js"></script>
  1358.  
  1359. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="Connected()">
  1360. <!--
  1361. processConnectConfirmed();
  1362. //-->
  1363. </script> 
  1364.  
  1365. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="DBChanged(cdata)">
  1366. <!--
  1367. var warr = new Array();
  1368. warr = cdata.split("~"); // parse the event data
  1369. // Ignore if Server Table change
  1370. if ( warr[0] == "4" ) 
  1371.     return; // ignore
  1372. top.Rstatus.StatDB.style.display = "";
  1373. if ( CTid == null ) {
  1374.     CTid = setTimeout("processDBChanged()",30000); // Delay 30 secs then process
  1375. }
  1376. //-->
  1377. </script>
  1378.  
  1379. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="Disconnected()">
  1380. <!--
  1381. top.Rstatus.Pstat("Disconnected",true);
  1382. if ( Tid != null ) {
  1383.     clearTimeout(Tid); // stop timeout routine
  1384. }
  1385. Tid = setTimeout("processReconnect()",10000); // Delay 10 secs then try reconnnect
  1386. //-->
  1387. </script>
  1388.  
  1389.  
  1390.  
  1391. <script LANGUAGE="JavaScript" FOR="RpmCC_VA"
  1392. EVENT="AlertGroupLookupRecordPart1(AlID, AlName, AlDesc, AlThresh, AlOver, AlEveryTime, AlDur, AlSched, AlSDT, AlEDT, AlArrayIDs)">
  1393. <!--
  1394. AlertLupRecPart1(AlID, AlName, AlDesc, AlThresh, AlOver, AlEveryTime, AlDur, AlSched, AlSDT, AlEDT, AlArrayIDs);
  1395. //-->
  1396. </script>
  1397.  
  1398. <script LANGUAGE="JavaScript" FOR="RpmCC_VA"
  1399. EVENT="AlertGroupLookupRecordPart2(AlID, AlRunProg, AlProgNme, AlProgramArgs, AlENotify, AlEAddr, AlESubj, AlPhNotify, AlPhNumber, AlTextToSpeak, AlPgNotify, AlPgNumber, AlTextToSend)">
  1400. <!--
  1401. AlertLupRecPart2(AlID, AlRunProg, AlProgNme, AlProgramArgs, AlENotify, AlEAddr, AlESubj, AlPhNotify, AlPhNumber, AlTextToSpeak, AlPgNotify, AlPgNumber, AlTextToSend);
  1402. //-->
  1403. </script>
  1404.  
  1405. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertGroupOpComplete()">
  1406. <!--
  1407. processAlertOpComplete();
  1408. VA_CommBusy = 0; // reset Comm busy flag
  1409. //-->
  1410. </script> 
  1411.  
  1412. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertGroupOpError()">
  1413. <!--
  1414. processAlertOpError();
  1415. VA_CommBusy = 0; // reset Comm busy flag
  1416. //-->
  1417. </script> 
  1418.  
  1419. <script LANGUAGE="JavaScript" FOR="RpmCC_VA"
  1420. EVENT="AlertEventLookupRecord1(EvID, EvTimStmp, EvValue, EvThresh, EvOver, EvDur, EvEmNotify, EvPhNotify, EvProNotify, EvPgNotify, EvObjNme, EvCntNme, EvCmpNme)">
  1421. <!--
  1422. AlertEventLupRec1(EvID, EvTimStmp, EvValue, EvThresh, EvOver, EvDur, EvEmNotify, EvPhNotify, EvProNotify, EvPgNotify, EvObjNme, EvCntNme, EvCmpNme);
  1423. //-->
  1424. </script>
  1425.  
  1426. <script LANGUAGE="JavaScript" FOR="RpmCC_VA"
  1427. EVENT="AlertEventLookupRecord2(EvID, EvAlertID, EvValueID, EvAlGrpID, EvObjID, EvCntrID, EvCmpID, EvGrpID, EvServerID, EvObjDesc, EvCntrDesc, EvCmpDesc, EvOSver)">
  1428. <!--
  1429. AlertEventLupRec2(EvID, EvAlertID, EvValueID, EvAlGrpID, EvObjID, EvCntrID, EvCmpID, EvGrpID, EvServerID, EvObjDesc, EvCntrDesc, EvCmpDesc, EvOSver);
  1430. //-->
  1431. </script>
  1432.  
  1433. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ComputerLookupRecord(Cid,Gid,SrvID,Nme,Desc,Pswd,OSVer,Addr,Port)">
  1434. <!--
  1435. processCompAddToStore(Nme,Desc,Cid);
  1436. if ( ALupMode == "AlertEvent" ) {
  1437.     processAlertServicesComputerLookup(Cid,Nme,Desc);
  1438. }
  1439. else if ( ALupMode == "EventPopIn" ) {
  1440.     processPopulateInputComputer(Cid,Nme,Desc);
  1441. }
  1442. //-->
  1443. </script> 
  1444.  
  1445. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ComputerOpComplete()">
  1446. <!--
  1447. if ( ALupMode == "EventPopIn" ) {
  1448.     processPopulateInputOpComplete();
  1449. }
  1450. VA_CommBusy = 0; // reset Comm busy flag
  1451. //-->
  1452. </script> 
  1453.  
  1454. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ComputerOpError()">
  1455. <!--
  1456. processComputerOpError();
  1457. VA_CommBusy = 0; // reset Comm busy flag
  1458. //-->
  1459. </script> 
  1460.  
  1461. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="StartCommunication()">
  1462. <!--
  1463. top.banner.processStartComm();
  1464. //-->
  1465. </script> 
  1466.  
  1467. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="StopCommunication()">
  1468. <!--
  1469. top.banner.processStopComm();
  1470. //-->
  1471. </script> 
  1472.  
  1473. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ELMonitorOpComplete()">
  1474. <!--
  1475. VA_CommBusy = 0; // reset Comm busy flag
  1476. processELMonitorOpComplete();
  1477. //-->
  1478. </script> 
  1479.  
  1480. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ELMonitorOpError()">
  1481. <!--
  1482. VA_CommBusy = 0; // reset Comm busy flag
  1483. processELMonitorOpError();
  1484. //-->
  1485. </script> 
  1486.  
  1487. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="EventLogDataRecord(ELData)">
  1488. <!--
  1489. VA_CommBusy = 0; // reset Comm busy flag
  1490. WarningBox.style.display = "none";
  1491. WarningBox1.style.display = "none";
  1492. if ( ELData == "GetLast" ) {
  1493.     WarningBox1.style.display = "";   
  1494. }
  1495. else {
  1496.     processAlertEventLogRecord(ELData);
  1497. }
  1498. //-->
  1499. </script> 
  1500.  
  1501. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ELMonitorLookupRecord(ELCrec)">
  1502. <!--
  1503. VA_CommBusy = 0; // reset Comm busy flag
  1504. processELMonitorLookupRecord(ELCrec);
  1505. //-->
  1506. </script> 
  1507.  
  1508. <script LANGUAGE="JavaScript" src="js/PopUpMenuFunc.js"></script>
  1509.  
  1510. <object ID="RpmCC_VA" NAME="RpmCC_VA" WIDTH="14" HEIGHT="1" style="display:none"
  1511. CLASSID="CLSID:D88C2358-FC83-11D1-BF49-00104B2D6F80" CODEBASE="controls/RPMComm.cab#version=5,2,0,0">
  1512.   <param name="_Version" value="65536">
  1513.   <param name="_ExtentX" value="2646">
  1514.   <param name="_ExtentY" value="1341">
  1515.   <param name="_StockProps" value="0">
  1516. </object>
  1517.  
  1518. <!-- Invisible Object to Support Simulated Click Event -->
  1519. <button id="FakeBut" style="display:none" onclick="top.banner.savePageCoord(event,document.body,'ViewEventlogDisplay')">
  1520. </button>
  1521.  
  1522. <!-- Define Images used in dynamic HTML generation to force loading and caching now -->
  1523. <div style="display:none">
  1524. <img src="images/sEventViewer.gif"><img src="images/Counter.gif"><img src="images/Unchecked.gif">
  1525. <img src="images/monitoritalert.gif"><img src="images/Computer.gif"><img src="images/L.gif">
  1526. <img src="images/Checked.gif"><img src="images/T.gif"><img src="images/Objects.gif">
  1527. <img src="images/EventlogDisplaySm.gif">
  1528. </div>
  1529.  
  1530.  <!-- PopUp to Prompt to Configure the Alert Filter -->
  1531.    <div id="PopUpDiv" class="PopUpBox" style="display:none; left:150; top:150; ">
  1532.    
  1533. <span id="ELogConfigLine" >
  1534. <center height="28" style="width:500; font-weight:800; font-size:10pt; background-color:graytext; color:captiontext" >Configure EventLogWatch Display Filter</center>
  1535.  <center><div class="EventConfig" id="ELogConfig" style="width:500px;" align="center">
  1536.  <table border="0" width="500" >
  1537.       <tr>
  1538.         <td width="90" align="right" class="inputlabel" height="32">Watch/Alert:</td>
  1539.             <td width="390" align="left" height="1">
  1540.             <select ONCHANGE="processAlertName()" SIZE="1" NAME="AL_AlertSel" id="AL_AlertSel" class="idis" style="width: 185pt" style="display: none"></select>
  1541.             </td>
  1542.              <select SIZE="1" NAME="AC_TrapMonitorStore" style="display: none"></select>  
  1543.      </tr>
  1544.       <tr style="display:none">
  1545.         <td width="90" align="right" class="inputlabel" height="32">Start Date:</td>
  1546.           <td width="390" align="left" height="1"><input TYPE="text" SIZE="17" style="font-weight: 500" NAME="VA_StartDate" calendar="VA_calwin" CalObj="" onClick="this.blur(); processCalendarClick(this)" style="cursor:hand"> </td>
  1547.       </tr>
  1548.         <tr style="display:none">
  1549.         <td width="90" align="right" height="1"></td>
  1550.         <td width="390" align="left" height="1"><div class="CalendarTextBox" Name="VA_calwin" ID="VA_calwin" CalState="0" style="display: none"></div></td>
  1551.       </tr>
  1552.       
  1553.        <tr style="display:none">
  1554.        <td width="90" align="right" class="inputlabel" height="1">Stop Date:</td>
  1555.           <td width="390" align="left" height="1"><input TYPE="text" SIZE="17" style="font-weight: 500" NAME="VA_StopDate" onClick="this.blur(); processCalendarClick(this)" style="cursor:hand" CalObj="" calendar="VA_scalwin"></td>
  1556.       </tr>
  1557.         <tr style="display:none">
  1558.         <td width="90" align="right" height="1"></td>
  1559.         <td width="390" align="left" height="1"><div class="CalendarTextBox" Name="VA_scalwin" ID="VA_scalwin" CalState="0" style="display: none"></div></td>
  1560.       </tr>
  1561.    
  1562.       <tr>
  1563.         <td width="90" align="right" class="inputlabel" height="1">Selection(s):</td>
  1564.         <td width="390" align="left" height="1">
  1565.           <div id="VA_Select" class="VASelectBox"></div>
  1566.           </td>
  1567.       </tr>
  1568.     </table></div>
  1569.     <table border="1" cellspacing="1" cellpadding="1" height="40" width="500">
  1570.    <tr><td align="left" width="20%" class="inputlabel">  Show On Open<br>  Last <select onchange="processMostRecentHours()" id="lasthours"></select> Hrs</td><td width="80%" align="center"><button onclick="processSelect('0')" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" style="width:80px; height:28px" id="bSelC" ><img src="images/selectall.gif" align="absmiddle" height="15" width="14">Select All</button>  <button onclick="processSelect('1')" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" style="width:93px; height:28px" id="bUselC" ><img src="images/unselectall.gif" align="absmiddle" height="15" width="14">Unselect All</button>  <button id="DoneButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Cancel and Hide the Configure Filter" style="width:70px; height:28px" onClick="processDoneButton()"><img src="images/CloseImg.gif" align="absmiddle" height="14" width="15"> Close</button></td></tr>
  1571.     </table></center></span>
  1572.     
  1573.        </div>
  1574.  <!-- End of PopUp to Prompt to Configure the Alert Filter -->
  1575.  
  1576.  
  1577.  
  1578. <center>
  1579.  
  1580.  <div id="VA_MainBox" class="VAMainBox" style="display:none">
  1581.  
  1582.   <div id="ViewAlertsTitleDiv"><table border="1"  borderColor="activeborder" align="left">
  1583.   <table border="1"  borderColor="activeborder" align="left">
  1584.     <tr><td borderColorDark="graytext" borderColorLight="white" style="font-weight:800; font-size:12pt; background-color:threedhighlight; color:windowtext"> <img src="images/EventlogDisplaySm.gif" align="absmiddle" height="16" width="16"> EventLogWatch Display </td></tr>
  1585. </table>
  1586. <BR CLEAR=ALL><HR align="left"></div>
  1587.  
  1588.  <!-- Alert Event Log Window -->
  1589. <center class="inputlabel">EventLogWatch Display</center>
  1590. <div class="EventLog" ID="ELogWin" style="width:99%" align="center">
  1591. <center><div style="display:none; width:100%" id="WarningBox" align="center"><table border="0" cellpadding="0" cellspacing="2">
  1592.   <tr>
  1593.     <td width="43"><img src="images/HourGlass.gif" width="32" height="32" alt="Please Wait!" align="bottom" border="0"></td>
  1594.     <td width="*" style="font-family:Arial; font-size:10pt; font-weight:bold; color:infotext">Please Wait For Most Recent EventLog Messages!</td>
  1595.   </tr>
  1596. </table>
  1597. </div>
  1598. <div style="display:none; width:100%" id="WarningBox1" align="center"><table border="0" cellpadding="0" cellspacing="2">
  1599.   <tr>
  1600.     <td width="*" style="font-family:Arial; font-size:10pt; font-weight:bold; color:red">There Are No Most Recent EventLog Messages Available!</td>
  1601.   </tr>
  1602. </table>
  1603. </div></center>
  1604. <span id="ELogText"></span><select SIZE="1" NAME="ELogParams" logeventid="" logtime="0" ELBgFlg=0 style="display: none"></select></div>
  1605.  <div style="height:0px; width:99%" align="center">
  1606.    <select SIZE="1" NAME="VA_EventStore" style="display: none"></select>
  1607.    <select SIZE="1" NAME="VA_ServEventStore" style="display: none"></select>
  1608.    <table border="1" cellspacing="1" cellpadding="1" height="40" width="100%">
  1609.     <tr>
  1610.       <td width="15%" align="left" class="inputlabel"><span title="Uses the 'Asterisk' WAV assignment in Control Panel->Sounds & Multimedia Properties"><INPUT TYPE="checkbox" NAME="AlertAudioEnabled" id="AlertAudioEnabled" class="inputlabel" CHECKED>Audio Alert</span></td>
  1611.         <td align="center" width ="70%"><button id="ViewCurrentButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="View Filter for Alerts and associated Events displayed in the Event Log" style="width:90px; height:29px" onClick="processViewCurrentButton()" disabled><img src="images/OpenImg.gif" align="absmiddle" height="14" width="15"> View Filter</button> <button id="ConfigButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Configure Filter for Alerts and associated Events displayed in the Event Log" style="width:120px; height:29px" onClick="processConfigureButton()" disabled><img src="images/ConfigImg.gif" align="absmiddle" height="18" width="17">Configure Filter</button> <button id="ClearButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Clear the Event Log" style="width:90px; height:29px" onClick="processClearButton()" disabled><img src="images/unselectall.gif" align="absmiddle" height="15" width="14"> Clear Log</button> <button id="StatusPrintButton" title="Print AlertWatch Status Log" onclick="if (this.bdis == '0') processPrintStatus();" bdis="0" style="width:90px; height:29px" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" DISABLED><img src="images/Printer.gif" align="absmiddle" height="15" width="17"> Print</button></td>
  1612.      <td width="15%" align="right"><button onclick="processBannerMenu()" title="Press to Toggle Hide/Show of Menu and Banner Frames" style="cursor:hand"><img src="images/FullView.gif" align="absmiddle" height="16" width="16"></button></td></tr></table></div>
  1613.  
  1614.  
  1615.  
  1616.    
  1617. <!-- Alert Filter Window-->
  1618. <span id="ELogViewCurLine" style="display:none"><HR align="left">
  1619. <center class="inputlabel" >EventLogWatch Display Filter</center>
  1620.  <div class="EventFilter" ID="ELogViewCur" style="height:110px; width:530px; " align="center">
  1621.     <select SIZE="1" NAME="VA_FilterStore" style="display: none"></select>
  1622.         </div>
  1623.   <table border="1" cellspacing="1" cellpadding="1" height="40" width="40%">
  1624.    <tr><td align="center"><button id="VC_DeleteButton" disabled="disabled" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Delete the Selected Filter Entry and stop display of associated Events in the Event Log" style="width:100px; height:28px" onClick="processDeleteEntryButton()"><img src="images/DelImg.gif" align="absmiddle" height="14" width="14">Delete Entry</button>  <button style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Hide the Filter Display" style="width:100px; height:28px" onClick="processHideCurrentButton()"><img src="images/collapse.gif" align="absmiddle" height="14" width="16">Collapse</button></td></tr>
  1625.     </table></span>
  1626.  
  1627.   <!--<div style="height:3px; width:92%" align="center"></div>-->
  1628.  
  1629.  </center></div>
  1630.  
  1631. </center>
  1632. </body>
  1633. </html>
  1634.